import React from 'react'
import {withRouter,} from 'react-router-dom'
import playerSrc from '../../../../../../res/images/web/vote/球员评分-新闻小广告@2x.png'
import lineupSrc from '../../../../../../res/images/web/vote/最佳阵容备份 2@2x.png'
import forecastSrc from '../../../../../../res/images/web/vote/最佳球员备份 2@2x.png'
import {RandomNum} from "../../../../../../utils/commonfunc";

const RandomVote = props => {
    const index = RandomNum(0, 2)
    const src = [playerSrc, lineupSrc, forecastSrc][index]
    const end = ['player', 'line-up', 'forecast'][index]
    return <div
        className='mg-b-8px'
        onClick={() => props.history.push(`./vote-list/${end}`)}
    >
        <img src={src} alt='' style={{width: '100%'}}/>
    </div>
}

export default withRouter(RandomVote)
